package com.gaofei.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author : gaofee
 * @date : 15:07 2020/12/2
 * @码云地址 : https://gitee.com/itgaofee
 */
@FeignClient(value = "nacos-provider",fallback = FallbackServiceImpl.class)//通过 @FeignClient("服务名") 注解来指定调用哪个服务。代码如下：
public interface FeignService {
    //这里必须保证和被调用的服务提供方的方法请求参数一致
    @GetMapping(value = "/test/{message}")
    String test(@PathVariable("message") String message);
}
